package edu.uoc.tds.pac4.beans;

import java.io.Serializable;
import java.sql.ResultSet;
import java.sql.SQLException;

/***
 *Bean creat per al informe estadistic de Assistents a un event 
 *
 */
public class EstAssistentEvent implements Serializable {
	private static final long serialVersionUID = 1L;
	private String idCard;
	private String nom;
	private String cognoms;
	private String perfilUsuari;
	private String nomUniversitat;
	
	public EstAssistentEvent(String idCard, String nom, String cognoms) {
		super();
		this.idCard = idCard;
		this.nom = nom;
		this.cognoms = cognoms;
	}

	public EstAssistentEvent() {
		super();
	}
	
	public String getIdCard() {
		return idCard;
	}
	public void setIdCard(String idCard) {
		this.idCard = idCard;
	}
	public String getNom() {
		return nom;
	}
	public void setNom(String nom) {
		this.nom = nom;
	}
	public String getCognoms() {
		return cognoms;
	}
	public void setCognoms(String cognoms) {
		this.cognoms = cognoms;
	}

	public String getPerfilUsuari() {
		return perfilUsuari;
	}

	public void setPerfilUsuari(String perfilUsuari) {
		this.perfilUsuari = perfilUsuari;
	}

	public String getNomUniversitat() {
		return nomUniversitat;
	}

	public void setNomUniversitat(String nomUniversitat) {
		this.nomUniversitat = nomUniversitat;
	}
	
	public void buildFromRS(ResultSet rs) throws SQLException{
		this.setCognoms(rs.getString("us_cognoms"));
		this.setNom(rs.getString("us_nom"));
		this.setIdCard(rs.getString("us_idcard"));
		this.setPerfilUsuari(rs.getString("us_perfilusuari"));
		this.setNomUniversitat(rs.getString("u_nom"));
	}
}
